#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org

START=98
STOP=05
USE_PROCD=1

start_service() {
	mkdir -m 0755 -p /var/cache/cups
	mkdir -m 0755 -p /var/cups
	mkdir -m 0755 -p /var/spool/cups/tmp

	procd_open_instance
	procd_set_param command /usr/sbin/cupsd -f -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
	procd_set_param respawn
	procd_close_instance
}

stop() {
	service_stop /usr/sbin/cupsd
}

reload() {
	service_reload /usr/sbin/cupsd
}
